/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gitee.fdc.base.service;

import java.util.List;
import com.gitee.fdc.base.entity.BaseEntity;
import java.io.Serializable;

/**
 *
 * @author qskj
 * @param <T>
 * @param <ID>
 */
public interface BaseService<T extends BaseEntity, ID extends Serializable> {

    public int save(T entity);

    public int saveSelective(T entity);

    public T findById(ID id);

    public T findByIdDespiteDelFlag(ID id);

    public int deleteById(ID id);

    public int deleteByIds(String ids);

    public int delete(T entity);

//    public int unDelete(T entity);
    public List<T> findAll();

    public List<T> findAllPaged();

    public int updateByPrimaryKeySelective(T entity);

    public int updateByPrimaryKeySelectiveDespiteDelFlag(T entity);

    public boolean isPropertyUnique(ID id, String propName, Object propValue);
}
